<?php
	
	#$DOCUMENT_ROOT = $_SERVER['DOCUMENT_ROOT'];	
	$DOCUMENT_ROOT = "";	
	$IMG_PATH = $DOCUMENT_ROOT . "uploads/products/";
	$IMG_CONTENT_PATH = $DOCUMENT_ROOT . "uploads/content_detail/";

	#include $DOCUMENT_ROOT . 'lib_php/mysqllib.php';	#thư viện mysql truy cập
	#include $DOCUMENT_ROOT . '/lib_php/gfunction.php';	#thư viện hiển thị webiste: phân trang, hiển thị category, hiển thị...
	
#DB online
	/*
    $mysql_host = "mysql1.000webhost.com";
	$mysql_database = "a2592666_shopbx";
	$mysql_user = "a2592666_root";
	$mysql_password = "lbv23483";
	*/
	
	#DB local
    #$mysql_host = "192.168.10.215";    
	$mysql_host = "localhost:3307";
	$mysql_database = "shopbx";
    $mysql_user = "root";
    $mysql_password = "";
    
    #define ("mysql_host", $mysql_host);
    #define ("mysql_database", $mysql_database);
    #define ("mysql_user", $mysql_user);
    #define ("mysql_password", $mysql_password);      

    #---------------------------------------------------------------------------------------
    #$conn = mysql_connect( mysql_host, mysql_user, mysql_password )  or die(mysql_error());
    #mysql_select_db(mysql_database, $conn) or die(mysql_error());
	#mysql_query("SET character_set_results=utf8", $conn);	// show data VNs
	#---------------------------------------------------------------------------------------
	
	#$Config["MySQL"]["DBHost"]=$mysql_host;
    #$Config["MySQL"]["DBUser"]=$mysql_user;
    #$Config["MySQL"]["DBPass"]=$mysql_password;
    #$Config["MySQL"]["DBName"]=$mysql_database;
    
    #$DB = new MySQL($mysql_host, $mysql_user, $mysql_password, $mysql_database); 
	
	
//  echo "connection ok";

    
    ### start session
    session_start();
    
    #check session
    #if (isset($_SESSION["Login"]))	echo $_SESSION["Login"]["id"] . $_SESSION["Login"]["group_id"];
    
/*  

// 	test sql

    $query = "SELECT * FROM `users` WHERE `username`='%s' AND ".
           "`password`='%s'";
           
    $query = sprinf($query, mysql_escape_string($_SERVER['PHP_AUTH_USER']),
                          $saltedPassword );
  
    $user = mysql_fetch_assoc( mysql_query($query) );
  
    mysql_close($conn);
*/              
    
    //define
    /*
    $product_cat= array(1 => array( 1=>'ユーザーの要望', 2=>'クエスト', 3=>'アイテム', 4=>'スキル', 5=>'モンスター&マップ', 6=>'キャラクター', 7=>'その他' ),
    		2 => array( 1=>'アカウント盗用', 2=>'ハッキング通報', 3=>'詐欺 ', 4=>'会員退会', 5=>'会員退会キャンセル', 6=>'その他' ),
    		3 => array( 1=>'メチティング', 2=>'ファム', 3=>'その他' ),
    		4 => array( 1=>'設置障害', 2=>'接続障害', 3=>'実行障害', 4=>'その他' ),
    		5 => array( 1=>'イベントお問い合わせ', 2=>'イベント商品配送', 3=>'その他' ),
    		6 => array( 1=>'料金決済', 2=>'払い戻し', 3=>'その他' ),
    		7 => array( 1=>'その他' ));
   	*/
    
    //Dung de load category
    
   	#user & user group 
   	$user_type = array(0 => 'Đăng ký mới', 1 => 'Đã xác nhận email', 2 => 'Khóa User', 3 => 'Xóa User');
    $user_group = array(0 => 'User', 1 => 'Admin', 2 => 'Super Admin');
       
    $user_group_type = array(0 => 'Khác hàng', 1 => 'Nhân viên');
    $user_group_acp = array(0 => 'Yes', 1 => 'No');
    $user_group_default = array(0 => 'Yes', 1 => 'No');
    $user_group_status = array(0 => 'Hiển thị', 1 => 'Không hiển thị');
    
	#Product & Product Category
	$product_special = array(0 => 'Bình Thường', 1 => 'Đặc biệt', 2 => 'Giá rẻ');
	$product_status = array(0 => 'Đang bán', 1 => 'Hết hàng', 2 => 'Sắp bán');
	
	$product_cat_status = array(0 => 'Hiển thị', 1 => 'Không hiển thị');	
	
	#Invoice
	$invoice_status = array(0 => 'Chưa thanh toán', 1 => 'Hàng đang đi đường', 2 => 'Đã giao hàng', 3 => 'Đã hủy đơn hàng');
?>